<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.muzaffercompany.beans.Movie"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<c:import url="header.jsp">
		<c:param name="userName">Muzaffer</c:param>
	</c:import>

	<%--
	<%!List<String> cities = new ArrayList<String>();%>

	<%
		String message = "&lt;b&gt;</b> tag'i istenilen yazıyı kalın yapar.";
		pageContext.setAttribute("message", message, PageContext.PAGE_SCOPE);
		pageContext.setAttribute("boyleBirAttributeYok", "Selam");
		pageContext.setAttribute("test", "test");

		cities.add("İstanbul");
		cities.add("Ankara");
		cities.add("İzmir");
		cities.add("Konya");

		pageContext.setAttribute("cities", cities);
	%>

	${pageScope.message}

	<c:out value="${pageScope.message}" escapeXml="false" />

	<c:out value="${boyleBirAttributeYok}" default="Bulunamadı" />

	<c:out value="${test}">
		O zaman burayı yaz
	</c:out>


	<c:out value="${cities[0]}" />
	<br />

	<ul>
		<c:forEach items="${cities}" var="city" begin="1" end="3" step="2"
			varStatus="sira">
			<li>${sira.count}${city}</li>
		</c:forEach>
	</ul>

	<c:forEach begin="1" end="10" var="i">
		<c:out value="${i}. sayı<br/>" escapeXml="false" />
	</c:forEach>

	<%
		List<Movie> movies = new ArrayList<Movie>();
		movies.add(new Movie("God Father", 100));
		movies.add(new Movie("Maskeli Beşler", 200));
		movies.add(new Movie("Scarface", 300));
		movies.add(new Movie("Good Fellas", 400));
		movies.add(new Movie("Esaretin Bedeli", 500));
		movies.add(new Movie("Memento", 600));
		movies.add(new Movie("Eşkiya", 700));
		movies.add(new Movie("Old Boys", 800));
		pageContext.setAttribute("movies", movies);
	%>

	<table>
		<c:forEach items="${movies}" var="movie" varStatus="i">
			<tr>
				<td>${i.first}</td>
				<td>${i.count}</td>
				<td>${movie.name}</td>
				<td>${movie.duration}</td>
			</tr>
		</c:forEach>
	</table>

	<%
		String userName = "yigit";
	%>

	<hr />

	<c:if test="${empty userName}" var="result">
		User name is empty
	</c:if>
	<c:if test="${userName eq 'yigit'}" var="result">
		Selam ${userName}
	</c:if>


	<c:out value="${result}" />

	<hr />
	 --%>
	<%
		pageContext.setAttribute("role", "abc");
	%>

	<c:choose>
		<c:when test="${role eq 'admin'}">
			Merhaba Admin.
		</c:when>
		<c:when test="${role eq 'dba' }">
			Merhaba dba.
		</c:when>
		<c:when test="${role eq 'user' }">
			Merhaba user.
		</c:when>
		<c:otherwise>
			Seni tanımıyorum.
		</c:otherwise>
	</c:choose>

	<hr />

	<c:set var="name" value="Muzaffer" scope="page" />
	${name}
	<c:remove var="name" />
	<c:set var="name" scope="page" />
	${name}



	<%!List<String> cities = new ArrayList<String>();%>
	<%
		pageContext.setAttribute("cities", cities);
	%>
	<%--
	<c:import
		url="http://maps.google.com/maps/empw?url=http:%2F%2Fmaps.google.com%2Fmaps%3Ff%3Dq%26ie%3DUTF8%26ll%3D40.991418,29.0239139%26spn%3D7.747835,23.24707%26z%3D6%26output%3Dembed&hl=tr"></c:import>
    --%>























































</body>
</html>